import request from '@/router/axios';
export const getRuleType = () => {
  return request({
    url: '/api/blade-platform/rule/ruleType',
    method: 'get',
  })
}
export const getList = (current, size, params) => {
  return request({
    url: '/api/blade-platform/rule/list',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
}
export const getDetail = (id) => {
  return request({
    url: '/api/blade-platform/rule/info/'+id,
    method: 'get',
    params: {
      id,
    }
  })
}
export const remove = (ids) => {
  return request({
    url: '/api/blade-platform/rule/remove',
    method: 'post',
    params: {
      ids,
    }
  })
}
export const add = (row) => {
  return request({
    url: '/api/blade-platform/rule/install',
    method: 'post',
    data: row
  })
}
export const update = (row) => {
  return request({
    url: '/api/blade-platform/rule/update',
    method: 'post',
    data: row
  })
}
export const Getcharacteristic = () => {
  return request({
    url: '/api/blade-platform/rule/threelinkage',
    method: 'get',
  })
}
export const getfunction = () => {
  return request({
    url: '/api/blade-platform/rule/getfunction',
    method: 'get',
  })
}
export const debug = (data) => {
  return request({
    url: '/api/blade-platform/rule/debugging',
    method: 'post',
    data
  })
}
export const ruleArray = (query) => {
  return request({
    url: '/api/blade-platform/rule/ruleArray',
    method: 'get',
    params: query
  })
}


export const asthmaRole = (data) => {
  return request({
    url: '/api/blade-platform/Role/asthmaRole',
    method: 'post',
    data
  })
}
